﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>GridView固定表头+分组+固定</title>
    <style type="text/css">
        .staicTitlteDiv
        {
            width: 1000px;
            height: 500px;
            overflow: scroll;
            scrollbar-face-color: EAECEC;
            scrollbar-highlight-color: EAECEC;
            scrollbar-shadow-color: BLACK;
            scrollbar-3dlight-color: EAECEC;
            scrollbar-arrow-color: EAECEC;
            scrollbar-track-color: FFFFFF;
            scrollbar-darkshadow-color: EAECEC;
        }
        .fixedHeaderTr
        {
            position: relative;
            border: 0;
            top: expression(this.offsetParent.scrollTop);
        }
        th
        {
            position: relative;
            background-color: Beige;
            top: expression(this.offsetParent.scrollTop);
        }
    </style>
</head>
<body style="text-align: center">
    <form id="form1" runat="server">
    <div class="staicTitlteDiv">
        <asp:GridView ID="GridView1" runat="server">
            <HeaderStyle CssClass="fixedHeaderTr" BorderColor="Beige" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
